revCloseDatabase
Type
command
Summary
Closes the connection to a database.
Syntax
revCloseDatabase <databaseID>
Description
Use the revCloseDatabase command to cleanly log off from a database.
All open databases are closed automatically when the application quits. However, it is recommended practice to explicitly close database connections when your stack is finished with them.
The revCloseDatabase command closes all open record sets opened by the database, as well as closing the database itself.
The revCloseDatabase command is part of the Database library. To ensure that the command works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure both the "Database" library checkbox and those of the database drivers you are using are checked.
Parameters
Name | Type | Description |
---|---|---|
databaseID | The number returned by the revOpenDatabase function when the database was opened. |
Examples
revCloseDatabase savedBudgetDB
Related
keyword: string
library: Database library
command: revCloseCursor, revRollBackDatabase
control structure: function
function: revDatabaseConnectResult, revdb_rollback, revDatabaseID
glossary: LiveCode custom library, Standalone Application Settings, database, standalone application, record set, command
Compatibility and Support
Introduced
LiveCode 2.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile